<div class="content-warp">
  <div class="content-header">
    <span class="content-title">小程序授权</span>
  </div>
  <div class="content-body">
    <nz-spin [nzSpinning]="_isSpinning" style="width: 100%;text-align:center;"></nz-spin>
    <div class="inner-content" *ngIf="type !== undefined">
        <div class="authorization-info">
          <div>
            <div class="authorization-is">
              <div class="authorization-photo">
                <i class="iconfont icon-fuwushouquan authorization-success" *ngIf="type===0"></i>
                <i class="iconfont icon-gantanhao-xianxingsanjiaokuang authorization-warning" *ngIf="type===1"></i>
                <i class="iconfont icon-iconfontquxiaoshouquan authorization-error" *ngIf="type===2"></i>
              </div>
              <div class="authorization-msg">
                <div class="authorization-p">
                  <span *ngIf="type===0">您已授权小程序</span>
                  <span *ngIf="type===1">您未完成授权</span>
                  <span *ngIf="type===2">您未授权小程序</span>
                </div>
                <button nz-button [nzType]="'primary'" [nzSize]="'large'" type="button" (click)="gotoWechatGetAuthorization()">
                  <span *ngIf="type===0">重新授权</span>
                  <span *ngIf="type===1">继续授权</span>
                  <span *ngIf="type===2">立即授权</span>
                </button>
              </div>
            </div>
            <div class="authorization-list" *ngIf="type!==2">
              <div class="authorization-item" *ngFor="let item of wxauthorization;let i = index;">
                <i class="anticon anticon-check" *ngIf="wxauthorizationType[i]"></i>
                <i class="anticon anticon-close" *ngIf="!wxauthorizationType[i]"></i>
                {{item}}
              </div>
            </div>
          </div>
          <div *ngIf="needAuth&&type===0">
            <span>业务域名授权：</span>
            <button nz-button  [nzType]="'primary'" type="button" (click)="setAuth()">确认授权</button>
          </div>
        </div>
      <div class="introduction">
        <div class="block" *ngIf="type===0">
          <div class="title">授权说明</div>
          <div class="p">1、企业类型帐号，可以根据需要确定是否申请微信认证（认证入口：登录小程序—设置—基本设置—微信认证—详情）</div>
        </div>

        <div class="block" *ngIf="type===1">
          <div class="title">授权说明</div>
          <div class="p">1、部分权限未授权，无法正常使用快用小程序，请再次授权</div>
        </div>

        <div class="block" *ngIf="type===2">
          <div class="title">授权说明</div>
          <div class="p">1、企业类型帐号，可以根据需要确定是否申请微信认证（认证入口：登录小程序—设置—基本设置—微信认证—详情）</div>
          <div class="p">2、已认证帐号可使用微信支付权限，个人类型帐号暂不支持微信认证</div>
        </div>

        <div class="block" *ngIf="type===2">
          <div class="title">友情提示</div>
          <div class="p">1、如果您还没有注册微信小程序，请前往微信公众平台注册微信小程序</div>
          <div class="p">2、小程序授权后才可进入小程序发布和小程序设置</div>
          <div class="p">3、如果在授权过程中有任何困难或障碍，请前往快用小程序帮助中心 <a href="http://www.usexcx.com/help.html" target="_blank">http://www.usexcx.com/help.html</a></div>
          <div class="p">4、需使用注册小程序的管理员的微信号进行操作</div>
        </div>

        <div class="block" *ngIf="type===2">
          <div class="p">注：帮您进行小程序的代码开发与管理（免ID和密钥的管理）</div>
        </div>

      </div>
      <div class="applet-info" *ngIf="type===0">
        <div class="applet-item">小程序名称：{{appletInfo.nick_name}}</div>
        <div class="applet-item" >微信支付：
          <span *ngIf="appletInfo.wx_pay">已配置</span>
          <a *ngIf="!appletInfo.wx_pay" routerLink="/member/applet-setting/setting">未配置</a>
        </div>
        <div class="applet-item">微信认证：{{appletInfo.wx_verify?'已认证':'未认证'}}</div>
        <div class="applet-item full-with">小程序类目：<span *ngFor="let item of wx_category" class="wx-category">{{item.first_class + '-' + item.second_class}}</span></div>
      </div>
    </div>
  </div>
</div>
